
<div id="mis-detail" class="mod ui-widget-content ui-helper-clearfix ui-corner-all">

    <div class="hd ui-widget-header ui-helper-clearfix ui-corner-all">
        <h2>MIS Detail</h2>
    </div>

    <div class="bd">
    <?php FormHelper::StartForm('form-name-here', '', 'GET') ?>
    <?php FormHelper::ErrorMessages($errors) ?>
    <?php
            $colOptions = array(
                array('col_name'=>'Field', 'field'=>'ui_name', 'ui_class'=>'grid-5'),
                array('col_name'=>'New Value', 'field'=>'new_value', 'ui_class'=>'grid-5'),
                array('col_name'=>'Old Value', 'field'=>'old_value', 'ui_class'=>'grid-5'),
            );

			if ($data['flag_new']) {
				array_unshift($colOptions, array('col_name'=>'', 'field'=>'field1', 'ui_class'=>'grid-1'));

				$colOptions[] = array('col_name'=>'Recover Value', 'field'=>'recover_value', 'ui_class'=>'grid-5');
			}

            $sync = $data['sync'];
            foreach ($sync as $table_name=>$table_data) {
    ?>

    	<fieldset class="ui-widget-content">
        <legend class="ui-widget-header"><?=$table_name?></legend>
        <?php 
            
            FormHelper::Table($table_data, $colOptions);
        ?>
        </fieldset>
    <?php
            }
    ?>
        <span class="buttons">
            <?php
                FormHelper::HiddenField('act', 'recover');
                FormHelper::HiddenField('pdes_type', $data['pdes_type']);
                FormHelper::HiddenField('id', $data['id']);
                if ($data['flag_new']) {
                    FormHelper::SubmitButton('update', 'Update');
                    FormHelper::SubmitButton('recover', 'Recover');
                }
                FormHelper::Button('cms-back', 'Back to list');
            ?>
        </span>

    <?php FormHelper::EndForm() ?>

    </div>

</div>

